package router

import (
	"ordersystem/controller"
	"ordersystem/middleware"

	"github.com/gofiber/fiber/v2"
)

func Setup(ap *fiber.App) {
	app := ap.Group("/", middleware.ConsoleRequestInformation)
	app.Post("/login", controller.UserLoginController)

	newAppCheckedLogin := app.Group("/", middleware.UserAuthorizationCheckMiddleware)

	SetLabRouter(&newAppCheckedLogin)
	SetUserRouter(&newAppCheckedLogin)
	SetDeviceRouter(&newAppCheckedLogin)
	SetOrderRouter(&newAppCheckedLogin)
}
